<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Author" content="cjw">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>购物车详细清单页</title>
  <link type="text/css" rel="stylesheet" href="../css/MyCss.css" />
  <link type="text/css" rel="stylesheet" href="../css/user-person.css" />
  <link type="text/css" rel="stylesheet" href="../css/base.css" />
  <style>
	/* S - 订单 */
	.order_con {overflow:hidden;}
	.order_con .order i{display: block; width: 16px; height: 16px;}
	.order_con .order img{display: block;}
	.order_con .order{width:680px; color:#ccc; padding:5px; border:1px solid #ddd; font-size:12px; margin:20px auto; overflow:hidden;}
	.order_con .order .top{height: 25px;}
	.order_con .order .con{}
	.order_con .order .con ul > li{list-style-type:none; padding:0 20px; margin-top:2px;}
	.order_now .order .con ul li .busi_name{height:22px; font-size:14px; font-weight:bold; color:#756e6e;}
	.order_con .order .con ul li table{}
	.order_con .order .con ul li table tbody tr{}
	.order_con .order .con ul li table tbody tr td{text-align: center; width:126px; color:#ccc;     padding: 2px; border-bottom:1px solid #ddd; border-right:1px solid #ddd;}

	.order_con .order .con ul li table tbody tr:nth-child(1) td{border-top:1px solid #ddd;}
	.order_con .order .con ul li table tbody tr td:nth-child(1){width:100px; border-left:1px solid #ddd; }
	.order_con .order .con ul li table tbody tr td:nth-child(2){width:160px;}
	.order_con .order .con ul li table tbody tr td:nth-child(3){}
	.order_con .order .con ul li table tbody tr td:nth-child(4){}
	.order_con .order .con ul li table tbody tr td:nth-child(5){}
	.order_con .order .con ul li table tbody .busi_name td{text-align:left; height:20px; padding-left:3px; border-top:1px solid #ddd;}
	.order_con .order .con ul li .li_bom{height:16px; overflow:hidden;} /*16px;46px;*/
	.order_con .order .con ul li .li_bom .order_state{height:16px;}
	.order_con .order .con ul li .li_bom .order_state label{float:right;}
	.more_infor:hover, .label_logistics:hover{color:#555; cursor:pointer;}
	.order_con .order .con ul li .li_bom .order_logistics{height:18px; background:#f6f4f0; 
	padding:6px; }
	.order_con .order .order_logistics label{display:block; float:left;}
	.order_con .order .order_logistics label:nth-child(2){width:24px; height:1px; margin-left: 10px;}

	.order_con .order .order_logistics .sure_order{float:right; width:60px; height:18px; text-align:center; color:#fff; border-radius:4px; background:#e6b981; cursor:pointer;}
	.sure_order{line-height:18px;}
	.order_con .order .order_logistics .sure_order:hover{background:#f58536}

	.order_con .order .bom{}
	.order_con .order .bom .money_space,.order_con .order .bom .money,.order_con .order .bom .original_money{float:right;}
	/* E - 订单 */

	.more-oprate, .goods_con > .more-oprate {padding:5px; width:93%; height:33px; position:relative; }
	.car-in-con{height: 696px;}

	.person_con {}
	.detailed {padding:10px 25px; height:686px;}
	.person_con > .detailed > label {overflow:hidden; display:block; margin:35px;}
	.person_con > .detailed > label > label {float: left; display:block; line-height: 30px;}
	.person_con > .detailed > label > label:nth-child(1) {width: 78px;}
	.person_con > .detailed > label .address-con > label {overflow:hidden; display:block; margin:10px -10px;}
	.person_con > .detailed > label .address-con > label:nth-child(1){margin:1px -10px;}
	.person_con > .detailed > label .address-con > label label {float: left; display:block; line-height: 30px;}
	.person_con > .detailed > label .address-con .input-button {color:#555; width: 78px; height: 25px; display: none;}
	.person_con > .detailed > label .address-con .input-button:hover {background:#ddd;}
	.person_con > .detailed > label .address-con  select {background: #fff;}
	.person_con > .detailed > label input {border:none; background: #fff;}
	.person_con > .detailed > h1 {font-size:16px;}
	.person_con > .more-oprate > .manage-sure {display:none;}
  </style>
 </head>
 <body>
	<!--S - infor-nav-->
	<div class="infor-nav">
		<div class="infor-nav-con">
			<!--登录 注册 我的订单 我的个人信息 购物车 -->
			<ul class="nolist">
				<li>
					<label>您当前还未登录</label>&nbsp;&nbsp;&nbsp;&nbsp;
					<label>注册</label>
				</li>
				<li></li>
				<li></li>
				<li>
					<label class="my-infor">我的个人信息</label>&nbsp;&nbsp;
					<label class="my-order">我的订单</label>&nbsp;&nbsp;
					<label class="my-cart">
						<!--
						<i class="my-cart-i" title="购物车"></i>
						-->
						购物车
					</label>
				</li>
			</ul>
		</div>
	</div>
	<!--E - infor-nav-->

	<!--S - follow-box-->
	<div class="follow-box"></div>
	<!--E - follow-box-->

	<!--S - goods-nav-->
	<div class="goods-nav">
		<div class="goods-nav-con">
			<div class="shop-icon">
				<a href="../index.html"></a>
			</div>
			<div class="shop-nav">
				<ul class="nolist">
					<li>服装</li>
					<li>日用品</li>
					<li>食品</li>
					<li>电子产品</li>
					<li>高科技</li>
				</ul>
			</div>
			<!--查找-->
			<div class="search" id="search">
				<input type="text" placeholder="请输入要商品关键字" id="search_text">
				<input type="button" value="搜索本站" id="search_button">
				<!--搜索结果显示区-->
				<div class="search_show" id="search_show"></div>
			</div>
		</div>
	</div>
	<!--E - goods-nav-->
	
	<!-- S - main_box -->
	<div class="main_box">
		<!--左边导航-->
		<div class="left_nav">
			<ul class="nolist">
				<li class="order">订单</li>
				<li class="shop-car">购物车</li>
				<li class="sales">我的收藏</li>
				<li class="goods">我的足迹</li>
				<li>个人</li>
			</ul>
		</div>
		<!--右边内容-->
		<!--
			left-nav-cnt
				这是默认对应上面li的容器每一个对应容器都闭需添加
		-->
		<div class="right_con">
			<!--订单-->
			<div class="left-nav-cnt order_con">
				<div class="type1_Title">
					<label>
						<span>订单内容</span>
					</label>
					<label>
						<i class="search_i"></i>
						<input class="goods_search" placeholder="输入要查找的订单编号" type="text" />
					</label>
				</div>
				<!--in-nav-1 对应 in-cnt-1容器-->
				<div class="in_nav">
					<ul class="nolist">
						<li class="order_li">待发货</li>
						<li class="order_li">待收货</li>
						<li class="order_li">完成订单</li>
					</ul>
				</div>
				<div class="in_con container_box">
					<!-- 新的订单 order_wait -->
					<div class="in-cnt-1 order_wait">
						<ul class="nolist">
							
						</ul>
					</div>
					<!-- 正在交易 order_now -->
					<div class="in-cnt-1 order_now">
						<ul class="nolist">
							
						</ul>
					</div> 
					<!-- 过去订单 order_ed -->
					<div class="in-cnt-1 order_ed">
						<ul class="nolist">
							
						</ul>
					</div>
				</div>
			</div>
			<!--购物车-->
			<div class="left-nav-cnt">
				<div class="type1_Title">
					<label>
						<span>购物车</span>
					</label>
					<label>
						<i class="search_i"></i>
						<input placeholder="输入要查找的商品名称" class="goods_search" type="text" />
					</label>
				</div>
				<div class="car_con container_box">
					<div class="car-in-con">
						<ul class="nolist">
							<!--<li data-id="">
							<div class="lictn">
								<label class="goodspho">
									<img src='E:/tako/tako.jpg' width="55" height="60" />
								</label>
								<label class="goodsdes">
									<label class="goods-infor">
										<label class = "goods-name">黑白条纹打底衫</label>
										<label class="goods-color">粉色</label>
										<label class="goods-num">2</label>
										<label class="goods-size">XXL</label>
										<label class="goods-price">220</label>
									</label>
								</label>
							</div>
						</li>-->
						</ul>
					</div>
					<div class="more-oprate">
						<input class="input-button settlement" type="button" value="结算"/>
						<span style="margin-left:80px;">总金额：<font class="money">0</font>元</span>
						<label style="margin-left:50px;">
							<font class="allSelect-text">全选</font>&nbsp;&nbsp;
							<input type="checkbox" class="allSelect-bt" />
						</label>
					</div>
				</div>
			</div>
			<!--我的收藏-->
			<div class="left-nav-cnt">
				<div class="type1_Title">
					<label>
						<span>我的收藏</span>
					</label>
					<label>
						<i class="search_i"></i>
						<input placeholder="输入要查找的商品名称" class="goods_search" type="text" />
					</label>
				</div>
				<div class="colle_con container_box">
					<ul class="nolist">
						<!--<li>
								
								<div class="lictn" data-id="">
									<label class="goodspho">
										<img src='E:/tako/tako.jpg' width="55" height="60" />
									</label>
									<label class="goodsdes">
										<label class="goods-infor">
											<label class="goods-name">黑白条纹打底衫</label>
											<label class="goods-price"><del>110</del>120</label>
											<label class="foot-time">2018/1/1 10:23</label>
											<label class="colle-bt">
												<img src="../image/colle1.png" title="单击放弃收藏" width="20px" height="20px"/>
											</label>
										</label>
									</label>
								</div>
								
						</li>-->
					</ul>
				</div>
			</div>
			<!--我的足迹-->
			<div class="left-nav-cnt">
				<div class="type1_Title">
					<label>
						<span>我的足迹</span>
					</label>
					<label>
						<i class="search_i"></i>
						<input placeholder="输入要查找的商品名称" class="goods_search" type="text" />
					</label>
				</div>
				<div class="foot_con container_box">
					<ul class="nolist">
						<!--<li>
								
								<div class="lictn" data-id="">
									<label class="goodspho">
										<img src='E:/tako/tako.jpg' width="55" height="60" />
									</label>
									<label class="goodsdes">
										<label class="goods-infor">
											<label class="goods-name">黑白条纹打底衫</label>
											<label class="goods-price"><del>110</del>120</label>
											<label class="foot-time">2018/1/1 10:23</label>
											<label class="colle-bt">
												<img src="../image/food_hover.png" title="点击清除足迹" width="20px" height="20px"/>
											</label>
										</label>
									</label>
								</div>
								
						</li>-->
					</ul>
				</div>
			</div>
			<!--个人-->
			<div class="left-nav-cnt">
				<div class="type2_Title">
					<label>
						<span>个人</span>
					</label>
				</div>
				<div class="person_con container_box">
					<div class="detailed">
						<h1>个人信息</h1>
						<label>
							<label>用户昵称：</label>
							<label><input class="username input-text" type="text" disabled/></label>
						</label>
						<label>
							<label>等级：</label>
							<label><span class="level">初级会员</span><img class="level_ico" src="../image/person/Member2.png" /></label>
						</label>
						<label>
							<label>积分：</label>
							<label><span class="integral"></span></label>
						</label>
						<label>
							<label>真实姓名：</label>
							<label><input class="trueName input-text" type="text" disabled/></label>
							<label><i></i></label>
						</label>
						<label>
							<label>性别：</label>
							<label><input class="sex input-text" type="text" disabled/></label>
							<label><i></i></label>
						</label>
						<label>
							<label>手机号：</label>
							<label><input class="pNumber input-text" type="text" disabled/></label>
							<label><i></i></label>
						</label>
						<label>
							<label>邮箱：</label>
							<label><input class="email input-text" type="text" disabled/></label>
							<label><i></i></label>
						</label>
						<label>
							<label>地址：</label>
							<label class="address-con">
								<label class="add-label"><input type="button" class="input-button add" value="添加" />
								</label>
								<!--
								<label>
									<label>
										<select class="select-button" disabled>
											<option>省份</option>
											<option>1</option>
											<option>2</option>
											<option></option>
											<option></option>
										</select>
									</label>
									<label>
										<select class="city select-button" disabled>
											<option>城市</option>
											<option>1</option>
											<option>2</option>
											<option></option>
											<option></option>
										</select>
									</label>
									<label>
										<input class="street input-text" type="text"/>
									</label>
									<label><i class=""></i></label>
									<!--
									<input name="username" class="input-text" type="text" disabled/>
									
								</label>
								-->
							</label>
						</label>
					</div>
					<div class="more-oprate">
						<input class="input-button manage-update" type="button" value="修改" />
						<input class="input-button manage-sure" type="button" value="确认"/>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- E- main_box -->

	<!--S -  foot-->
	<div class="foot">
		<div class="bom_container">
			<li style="color:#586069;list-style:none;padding:10px 245px;">Copyright ©2017 <span  style="color:#a71d5d;cursor:pointer;" title="作者介绍">chen</span> Powered By <span  style="color:#a71d5d;cursor:pointer;" title="程序目录">shop</span> Version 1.0.0</li>
		</div>
	</div>
	<!--E - foot-->
	<script src="../js/MyjsV0-8.2.js"></script>
	<script src="../js/Order_Mudle7.js"></script>
	<script src="../js/util-2.js"></script>
	<script src="../js/data.js"></script>
	<script>
	/* S - main_box */
	//$(".left-nav-cnt")[0].css("display:block;", false);
	/*左边导航*/
	/**
	左栏
	liElements
	cntElements
	*/
	liEvent_2.extends(LiEventSuper);
	function liEvent_2(data){
		LiEventSuper.call(this, data);

		this.overEventCss = function (i){
			if(i != -1){
				data.liElements[i].css("background:#555; color:#fff;", false); 
			}
		}
		//当前移出样式设置
		this.outEventCss = function (i){
			data.liElements[i].css("background:#f6f4f0; color:#555;", false); 
		}
		//e {i:preIndex}
		this.preClickFun = function (i){
			data.liElements[i].css("background:#f6f4f0; color:#555;", false);
			data.cntElements[i].css("display:none;");
		}
		//设置当前的元素 
		//e {i:i}
		this.nowClickFun = function (i){
			data.liElements[i].css("background:#555; color:#fff;", false);
			data.cntElements[i].css("display:block;");
		}
	}
	//订单内容选择框
	new liEvent_2({
		liElements:$(".order_li"),
		cntElements:$(".in-cnt-1"),
	}).doReady();
	/* E - main_box */

	/* S 订单的处理 */
	//初始化订单
	ajax({
		type:"post",
		url:"member_initOrder",
		success:function(msg){
			if($$.util.isJSON(msg)){
				console.log("初始化订单"+msg);
				var obj = $$.json.toObject(msg);
				manage1(obj.get("orders"));
				new liEvent_2({
					liElements:$(".left_nav")[0].$("li"),
					cntElements:$(".left-nav-cnt"),
					initIndex:obj.get("index")-1,
				}).doReady();
			}
			else alert("初始化订单数据异常"+msg);
		},
		error:function(){
			alert("初始化订单异常");
		}
	});

	//订单管理对象
	function manage1(objArr){
		/*
		console.log(jsonStr.charAt(0));
		var objArr = $$.json.toObject(jsonStr);
		*/
		console.log("数组集 - " + objArr.getJSONObject(0));
		console.log("长度 - " + objArr.length());
		if(objArr.length() > 0){
			var it = objArr.itarator();
			while(it.hasNext()){
				var of = new OrderFactory_1();

				var objData = it.next();

				var baseData = objData.get("obj");
				var orderObject = of.createOrder(baseData);

				var busiDatas = objData.get("busi");
				
				var busiDataIt = busiDatas.itarator();
				while(busiDataIt.hasNext()){
					var busiData = busiDataIt.next();
					var busiObject = of.createBusinessUser(busiData);
					var goodsDatas = busiData.get("goods");   //获取商品
					var goodsDataIt = goodsDatas.itarator();
					while(goodsDataIt.hasNext()){
						var goodsData = goodsDataIt.next();
						var goodsObject = of.createGoods(goodsData);
						busiObject.add(goodsObject);
					}
					orderObject.add(busiObject);
				}

				var Ele;
				
				//deliveryState 是否发货
				//progressState 已发货未知否完成订单
				if(busiData.get("deliveryState")){
					if(busiData.get("progressState")){
						//完成
						console.log("完成");
						$(".order_ed")[0].$("ul")[0].insert("<li>" + orderObject.makeHTML() + "</li>"); 
					}else{
						//未完成
						console.log("未完成");									$(".order_now")[0].$("ul")[0].insert("<li>" + orderObject.makeHTML() + "</li>"); 
					}
				}else{
					//待确认
					console.log("待确认");
					Ele = $(".order_wait")[0].$("ul")[0].insert("<li>"+ orderObject.makeHTML() +"</li>"); 
				}
				if(Ele != undefined){
					var ani = new AnimateRoutine({
						aniEle:Ele.$("ul")[0].$(".li_bom")[0],
						aniMin:16,
						aniMax:50,
						closeAll:false,
						type:"bottom",
					});
					var openBool = true;
					Ele.onclick = function (){
						if(openBool){
							openBool = false;
							ani.run();
						}else{
							openBool = true;
							ani.next();
						}
					}
				}
			}
		}
		
	}
	//
	var openBool = true;
	//正在交易的订单所有点击委托
	$(".order_now")[0].onclick = function(e){
		if(e.target.attr("class") == "sure_order"){
			console.log("确认收货");//（更正此处应该是确认收货 console.log("确认发货");）
			var parent = e.target.parent("div");
			while(parent.attr("class") != "order"){
				parent = parent.parent("div");
			}
			console.log(parent);
			//确认收货 传递给后台当前订单的编号
			ajax({
				type:"post",
				url:"",
				data:{data:"1",}, 
				success:function(msg){
					console.log(msg);
					//$(".order_ing")[0].$("ul")[0]
					//$(".order_ing")[0].appendChild(parent);
					parent.remove();
				},
				error:function(msg){console.log(msg);}
			});
		}
		/*if(e.target.attr("class") == "more_infor"){
			if(openBool){
				openBool = false;
				ani.run();
			}else{
				openBool = true;
				ani.next();
			}
		}*/
		//点击确认发货（更正此处应该是确认收货）
	}

	/* E 订单的处理 */

	/* S 购物车 */
	//初始化购物车
	/*
	ajax({
		type:"post",
		url:"member_initCar",
		success:function(msg){
			if(isJSON(msg)){
				console.log("初始化物车 "+msg);
				var objArr = Tokener.parseObject(msg); 
				var it = objArr.itarator();
				while(it.hasNext()){
					var object = it.next();
					var discount = "";
					if(object.get("discount").lenght > 0) discount = "<del>"+object.get("discount")*object.get("price") + "</del>";
					$(".car_con")[0].$("ul")[0].insert(carMudle(object.get("id"), object.get("img"), object.get("name"), object.get("color"), object.get("size"), object.get("quantity"), object.get("price"), discount));
				}
			}
			else alert("初始化物车 数据异常");
		},
		error:function(){
			alert("初始化物车 异常");
		}
	});
	*/

	function carMudle(id, img, name, color, size, count, price, discount){
		return '<li data-id="'+id+'"><div class="lictn">' +
								'	<label class="goodspho">' +
										'<img src="../'+img+'" width="55" height="60" />' +
									'</label>' +
									'<label class="goodsdes">' +
										'<label class="goods-infor">' +
											'<label class = "goods-name">'+name+'</label>' +
											'<label class="goods-color">'+color+'</label>' +
											'<label class="goods-num">'+count+'</label>' +
											'<label class="goods-size">'+size+'</label>' +
											'<label class="goods-price">'+discount+price+'</label>' +
											'<label class="check"><input type="checkbox" class="check-bt"/></label>' +
											'<label class="operate">' +
												'<img src="../image/manage/dele2.png" title="点击删除" width="20px" height="20px"/>' +
											'</label>' +
										'</label>' +
									'</label>' +
								'</div></li>';
	}

	//购物车点击委托
	var list = new ArrayList();
	$(".car_con")[0].onclick = function(e){
		//选择结算的商品
		if(e.target.attr("class") == "check-bt"){
			var li = e.target.parent("li");
			var id = li.attr("data-id");
			console.log(e.target.checked);
			var money = $(".money")[0].text();
			if(e.target.checked){
				$(".money")[0].text(li.$(".goods-num")[0]*li.$(".goods-price")[0] + money);
				list.add(id);
				console.log(list.size());
				
			}
			else {
				$(".money")[0].text(money - li.$(".goods-num")[0]*li.$(".goods-price")[0]);
				list.remove(id);
			}
		}
		//结算按钮
		if(e.target.attr("class") == "input-button settlement"){
			console.log(list.size());
			if(list.size() > 0){
				var it = list.itarator();
				var str = "";
				var bool = true;
				while(it.hasNext()){
					str += it.next() + (bool ? "" : "-");
					bool = false;
				}
				ajax({
					type:"post",
					url:"member_settlement",
					data:{data:str,},
					success:function(msg){
						self.location = "font/提交订单页面.html";
					},
					error:function(msg){
						alert("结算异常");
					}
				});

			}else{
				alert("请选择商品");
			}
		}
		if(e.target.attr("class") == "allSelect-bt"){
			if(e.target.checked){
				var lis = $(".car-in-con")[0].$("li");
				for(var i = 0; i < lis.length; i ++){
					//lis.$(".check-bt")[0].c
				}
			}
		}
	}
	/* E 购物车 */

	/* S 收藏 */
	//初始化收藏
	/*
	ajax({
		type:"post",
		url:"member_initColle",
		success:function(msg){
			if(isJSON(msg)){
				console.log("初始化收藏"+msg);
				var objArr = Tokener.parseObject(msg);
				var it = objArr.itarator();
				while(it.hasNext()){
					var coll = it.next();
					$(".colle_con")[0].$("ul")[0].insert(colleMudle(coll.get("id"), coll.get("img"), coll.get("name"), coll.get("price"), coll.get("time")));
				}
			}
			else alert("初始化收藏数据异常" + msg);
		},
		error:function(){
			alert("初始化收藏异常");
		}
	});
	*/
	//个人页
	function colleMudle(id, img, name, price, time){
		return '<li data-id="'+id+'"><div class="lictn" >' +
									'<label class="goodspho">' +
										'<img src="../'+img+'" width="55" height="60" />' +
									'</label>' +
									'<label class="goodsdes">' +
										'<label class="goods-infor">' +
											'<label class="goods-name">'+name+'</label>' +
											'<label class="goods-price">'+price+'</label>' +
											'<label class="foot-time">'+time+'</label>' +
											'<label class="colle-bt">' +
												'<img src="../image/colle1.png" title="单击放弃收藏" width="20px" height="20px"/>' +
											'</label>' +
										'</label>' +
									'</label>' + 
								'</div></li>';
	}
	/* E 收藏 */

	/* S 足迹 */
	//初始化足迹
	/*
	ajax({
		type:"post",
		url:"member_initFoot",
		success:function(msg){
			if(isJSON(msg)){
				console.log("初始化足迹"+msg);
				var objArr = Tokener.parseObject(msg);
				var it = objArr.itarator();
				while(it.hasNext()){
					var coll = it.next();
					$(".foot_con")[0].$("ul")[0].insert(footMudle(coll.get("id"), coll.get("img"), coll.get("name"), coll.get("price"), coll.get("time")));
				}
			}
			else alert("初始化足迹数据异常");
		},
		error:function(){
			alert("初始化足迹异常");
		}
	});
	*/

	function footMudle(id, img, name, price, time){
		return '<li data-id="'+id+'"><div class="lictn">' +
									'<label class="goodspho">' +
										'<img src="../'+img+'" width="55" height="60" />' +
									'</label>' +
									'<label class="goodsdes">' +
										'<label class="goods-infor">' +
											'<label class="goods-name">'+name+'</label>' +
											'<label class="goods-price">'+price+'</label>' +
											'<label class="foot-time">'+time+'</label>' +
											'<label class="colle-bt">' +
												'<img src="../image/colle1.png" title="点击清除足迹" width="20px" height="20px"/>' +
											'</label>' +
										'</label>' +
									'</label>' + 
								'</div></li>';
	}

	/* E 足迹 */

	/* S 个人 */
	var addressObject = new MerchantAddress();
	//修改
	$(".person_con")[0].$(".manage-update")[0].onclick = function(){
		var inputs = $(".person_con")[0].$("input");
		var len = inputs.length;
		for(var i = 0; i < len; i ++){
			if(inputs[i].attr("type") == "text"){
				inputs[i].disabled = false;
				inputs[i].style.background = "#f6f4f0";
			}
		}
		var selects = $(".person_con")[0].$(".address-con")[0].$("select");
		var len_ = selects.length;
		for(var i = 0; i < len_; i ++){
			selects[i].disabled = false;
			selects[i].style.background = "#f6f4f0";
		}

		$(".person_con")[0].$(".manage-update")[0].style.display = "none";
		$(".person_con")[0].$(".manage-sure")[0].style.display = "block";
		$(".person_con")[0].$(".address-con")[0].$(".add")[0].style.display = "block";
	}
	//确认
	$(".person_con")[0].$(".manage-sure")[0].onclick = function(){
		var inputs = $(".person_con")[0].$("input");
		var len = inputs.length;
		for(var i = 0; i < len; i ++){
			if(inputs[i].attr("type") == "text"){
				inputs[i].disabled = true;
				inputs[i].style.background = "#fff";
			}
		}
		var selects = $(".person_con")[0].$(".address-con")[0].$("select");
		var len_ = selects.length;
		for(var i = 0; i < len_; i ++){
			selects[i].disabled = true;
			selects[i].style.background = "#fff";
		}
		$(".person_con")[0].$(".manage-sure")[0].style.display = "none";
		$(".person_con")[0].$(".manage-update")[0].style.display = "block";
		$(".person_con")[0].$(".address-con")[0].$(".add")[0].style.display = "none";
	}
	//添加新地址
	$(".person_con")[0].$(".address-con")[0].$(".add")[0].onclick = function(e){
		var label = $(".person_con")[0].$(".add-label")[0].appendTop(addressObject.makeHTML("", "", "", true));
		console.log($(".person_con")[0].$(".add-label")[0].previoursElementSibling);
		console.log("地址栏元素 - "+label);
		var ss = label.$("select");
		ss[0].style.background = "#f6f4f0";
		ss[1].style.background = "#f6f4f0";
		label.$("input")[0].style.background = "#f6f4f0";
	}
	
	//初始化信息
	/*
	ajax({
		type:"post",
		url:"member_initInfor",
		success:function(msg){
			if(isJSON(msg)){
				//{"trueName":"\u9648", "address":[{"province":"\u5e7f\u4e1c", "city":"\u5e7f\u5dde", "street":"\u767d\u4e91", "id":1}], "integral":0, "sex":"\u7537", "mName":"\u4e3b\u5bb6", "pNumber":"13430394603", "email":"1281384046@qq.com"}
				var infor = Tokener.parseObject(msg);
				console.log("积分"+infor.get("integral"));
				$(".person_con")[0].$(".username")[0].value = infor.get("Name");
				$(".person_con")[0].$(".integral")[0].text(infor.get("integral"));
				$(".person_con")[0].$(".trueName")[0].value = infor.get("trueName");
				$(".person_con")[0].$(".sex")[0].value = infor.get("sex");
				$(".person_con")[0].$(".pNumber")[0].value = infor.get("pNumber");
				$(".person_con")[0].$(".email")[0].value = infor.get("email");

				var addresss = infor.get("address");
				var it = addresss.itarator();
				var code = "";
				while(it.hasNext()){
					var address = it.next();
					code += addressObject.makeHTML(address.get("province"), address.get("city"), address.get("street"), false);
				}
				$(".person_con")[0].$(".add-label")[0].appendTop(code);
			}else{
				alert("信息初始化异常");
			}
		},
		error:function(msg){
			alert("异常");
		}
	});
	*/

	//地址模板
	function MerchantAddress(){
		this.disCode = function(){
			return "disabled";
		}
		this.proCode = function(){
			return "";
		}
		this.cityCode = function(){
			return "";
		}
		this.makeHTML = function(province, city, street, flag){
			return '<label data-id="">'+
									'<label>'+
										'<select class="select-button" style="background:#f6f4f0" '+ (flag ? "" : this.disCode()) +'>'+
											'<option>'+ province +'</option>'+
											this.proCode()+
										'</select>'+
									'</label>'+
									'<label>'+
										'<select class="select-button" style="background:#f6f4f0" '+ (flag ? "" : this.disCode()) +'>'+
											'<option>'+ city +'</option>'+
											this.cityCode()+
										'</select>'+
									'</label>'+
									'<label>'+
										'<input class="input-text" style="background:#f6f4f0" type="text" value="'+street+'" '+ (flag ? "" : this.disCode()) +'/>'+
									'</label>'+
								'</label>';
		}
	}
	/* E 个人 */
	</script>
 </body>
</html>